const getCurrentDate = () => {
  const date = new Date();
  const year = date.getFullYear();
  const month = date.getMonth() + 1; // 月份从0开始
  const day = date.getDate();
  return `${month}月${day}日`;
}
const getCurrentAllDate = () => {  
  const date = new Date();  
  const year = date.getFullYear();  
  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，并且使用padStart来确保两位数  
  const day = String(date.getDate()).padStart(2, '0');  
  const hours = String(date.getHours()).padStart(2, '0');  
  const minutes = String(date.getMinutes()).padStart(2, '0');  
  const seconds = String(date.getSeconds()).padStart(2, '0');  
    
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;  
}  
const onHandToofg = () => {
  wx.switchTab({
    url: '/pages/ofg/ofg',
  })
}

const showT = () => {
  wx.showToast({
    title: '加载失败，请稍后再试',
    icon: 'none',
    duration: 2000
  });
}

module.exports = {
  getCurrentDate: getCurrentDate,
  onHandToofg: onHandToofg,
  getCurrentAllDate: getCurrentAllDate,
  showT: showT,
}
